// 统一定义角色相关接口返回类型
export interface ResponseDataType {
  code: number;
  message: string;
  boolean: boolean;
}

// 角色列表参数类型
export interface RoleListParams {
  pageNo: number;
  pageSize: number;
  roleName?: string;
}

// 角色类型
export interface RoleListItem {
  id?: number;
  createTime?: string;
  updateTime?: string;
  roleName: string;
  remark?: string;
}

// 角色列表类型
export type RoleList = RoleListItem[];

// 角色列表data返回类型
export interface RoleListData {
  records: RoleList;
  total: number;
  size: number;
  current: number;
  orders: [];
  optimizeCountSql: boolean;
  hitCount: boolean;
  countId: null;
  maxLimit: null;
  searchCount: boolean;
  pages: number;
}

// 角色列表返回数据类型
export interface RoleListResponse extends ResponseDataType {
  data: RoleListData;
}

// 权限的类型
export interface PermissionItem {
  id: number;
  createTime: string;
  updateTime: string;
  pid: number;
  name: string;
  code: string;
  toCode: string;
  type: number;
  status: number;
  level: number;
  children: PermissionList;
  select: boolean;
}

// 权限列表类型
export type PermissionList = PermissionItem[];

// 权限的返回类型
export interface PermissionResponse extends ResponseDataType {
  data: PermissionList;
}
